package mx.com.mindbits.bandpay.dao;

import mx.com.mindbits.dao.DaoMaster;
import mx.com.mindbits.dao.DaoMaster.DevOpenHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class ConnectionFactory {

	private DevOpenHelper   helper;
	private SQLiteDatabase  database;
	public static DaoMaster daoMaster;
	
	public ConnectionFactory(Context ctx){
		helper = new DaoMaster.DevOpenHelper(ctx, "bandpay",null);
		try {
			database = helper.getWritableDatabase();
		}catch(Exception ex){
			ex.printStackTrace();
		}
			daoMaster = new DaoMaster(database);
		return;
	}
	
	public void closeDataBase(){
		if(helper != null){
			helper.close();
		}
		
	}
}
